<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../CSS/reset.css">
    <title>Document</title>
    <style>
        ul {
            border: 10px solid red;
            width: 600px;
            height: 600px;
            margin: 0 auto;
            /* 弹性容器父元素 */
            display: flex;

            /* flex-direction: row;
            flex-wrap: wrap; */
            /* flex-flow:row wrap; 是flex-direction 和 flex-wrap的简写属性 */
            flex-flow: row wrap;
            justify-content: center;

            /* 垂直对齐 flex 项目 */
            align-items: center;

        }
        li {
     
            width: 100px;height: 100px;
            background-color: #bfa;
            font-size: 50px;
            line-height: 100px;
            /* 水平居中 */
            text-align: center;
            margin: 10px;
            padding: 10px;
        }
        li:nth-child(2){
            background-color: rgb(241, 193, 193);
        }
        li:nth-child(3){
            background-color: rgb(203, 222, 236);
        }
    </style>
</head>
<body>
    <ul class=".flex-container">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
        <li>9</li>
        <li>10</li>
        <li>11</li>
        <li>12</li>
    </ul>
</body>
</html>